// Project: Salient
// http://salient.codeplex.com
// 
// Copyright 2010, Sky Sanders <sky at skysanders.net>
// Dual licensed under the MIT or GPL Version 2 licenses.
// http://salient.codeplex.com/license
// 
// Date: April 25 2010 

#region

using System;

#endregion

namespace Salient.Diagnostics
{
    /// <summary>
    /// Snooty class name to avoid collision
    /// </summary>
    public static class Environs
    {
        ///<summary>
        ///</summary>
        public static string ProgramFiles
        {
            get { return Environment.GetEnvironmentVariable("ProgramFiles"); }
        }

        ///<summary>
        ///</summary>
        public static string ProgramFilesx86
        {
            get
            {
                if (8 == IntPtr.Size ||
                    (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
                {
                    return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
                }
                return ProgramFiles;
            }
        }
    }
}